Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xy data documentation #6736

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

ayushjariyal
Copy link
Contributor

@ayushjariyal ayushjariyal commented Jan 29, 2025

fix #6731

Refactored get_y() and Introduced get_y_arraynames():
Split the functionality of get_y() into two distinct methods:

  • get_y(): Returns the Y arrays along with their names and units.
  • get_y_arraynames(): Returns only the names of the Y arrays. This improves API clarity and usability.

Update Documentation:

  • Added an example usage snippet to the class docstring in XyData for easier understanding.
  • Update the index.rst documentation to reflect the new API changes and ensure consistency.

Added Test for get_y_arraynames():

  • Introduced a new test case to validate the functionality of get_y_arraynames().

@unkcpz
Copy link
Member

unkcpz commented Feb 13, 2025

Sorry for the late reply. @ayushjariyal could you resolve the conflict and fix the pre-commit error. We'll review it then.

@ayushjariyal
Copy link
Contributor Author

@unkcpz I accidentally deleted my previous branch and can no longer undo my previous changes, so I have opened a new PR. Could you please review it?

@unkcpz
Copy link
Member

unkcpz commented Feb 13, 2025

Sorry, I think you didn't delete it. It still here https://github.com/ayushjariyal/aiida-core/tree/issue_XyData_documentation

@ayushjariyal
Copy link
Contributor Author

Oh, I see! Thanks for letting me know. I’ll check on it.

Copy link

codecov bot commented Feb 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.12%. Comparing base (ce9dcf4) to head (58614be).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6736      +/-   ##
==========================================
+ Coverage   78.11%   78.12%   +0.02%     
==========================================
  Files         564      564              
  Lines       42542    42543       +1     
==========================================
+ Hits        33228    33234       +6     
+ Misses       9314     9309       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ayushjariyal ayushjariyal force-pushed the issue_XyData_documentation branch 2 times, most recently from 329bc35 to a9e7df5 Compare February 14, 2025 02:53
@ayushjariyal ayushjariyal force-pushed the issue_XyData_documentation branch from cffc576 to ce6f8ea Compare February 14, 2025 12:18
@ayushjariyal ayushjariyal force-pushed the issue_XyData_documentation branch from e3888a7 to 71a6017 Compare February 14, 2025 12:42
@ayushjariyal ayushjariyal force-pushed the issue_XyData_documentation branch from 0be89c2 to fb66e7d Compare February 14, 2025 13:13
@ayushjariyal
Copy link
Contributor Author

@unkcpz I am not able to understand why these checks have failed. Can you please help me figure that out?

@unkcpz
Copy link
Member

unkcpz commented Feb 15, 2025

I am not able to understand why these checks have failed. Can you please help me figure that out?

Don't worry, it is auto-fixed by pre-commit action, CI is passed.

Copy link
Member

@unkcpz unkcpz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ayushjariyal. Some requests:

  • The documentation should also changed, it is in
    In case you are working with arrays that have a relationship with each other, i.e. ``y`` as a function of ``x``, you can use the :py:class:`~aiida.orm.XyData` class:
  • Could you add a description in the PR to describe what you have changed and why?
  • Can you add a test to test the new behavior?

Since the behavior is changed, it should be regard as a break change (as a bugfix). @agoscinski Therefore, I will add it to with tag v2.8.0.

@ayushjariyal ayushjariyal force-pushed the issue_XyData_documentation branch from 43fd428 to 37abafa Compare February 17, 2025 06:15
@ayushjariyal ayushjariyal requested a review from unkcpz February 17, 2025 06:43
@unkcpz
Copy link
Member

unkcpz commented Feb 17, 2025

Thanks for update the PR @ayushjariyal. I am aware of your change, but please don't keep on click the merge with main button, I got notification everytime ;) I'll review it soon, I am quite packed until Thursday.

@ayushjariyal
Copy link
Contributor Author

Thank you for the update! Apologies for the repeated notifications—I didn’t realize it was causing any inconvenience. I’ll make sure to avoid clicking the merge button going forward. Looking forward to your review whenever you get the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XyData does not behave as expected
2 participants